<html>
	<head>
		<title>PyRETRO: WebAdmin Tool</title>
		<link rel="Shortcut Icon" type="image/x-icon" href="favicon.ico" />
		<link rel="StyleSheet" type="text/css" href="main.css" />
	</head>
	<body>
		<h1 class="shadow_box">PyRETRO: WebAdmin Tool</h1>
		<div id="menu" class="shadow_box">
			<a href="config.html?action=shutdown_machine">SHUTDOWN MACHINE</a>
			<a href="config.html?action=reset_pyretro">RESET PYRETRO</a>
			<a href="config.html?action=exit_current_game">EXIT CURRENT GAME</a>
			<a href="config.html?action=manage_db">MANAGE DB (TO IMPLEMENT)</a>
			<a href="config.html?action=logout" class="logout">LOGOUT</a>
		</div>
		<?pyretro {if message;<div id="message" class="shadow_box"><p>%message%</p></div>} ?>
		<div id="config" class="shadow_box">
			<h2>Configuration</h2>
			<form method="POST">
				<fieldset>
					<label for="id_mame_executable">MAME Executable:</label>
					<input type="text" id="id_mame_executable" name="mame_executable" value="<?pyretro %mame_executable% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_mame_options">MAME Options:</label>
					<input type="text" id="id_mame_options" name="mame_options" value="<?pyretro %mame_options% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_view_mode">View Mode:</label>
					<select type="text" id="id_view_mode" name="view_mode">
						<option value="1" <?pyretro {if view_mode==1;selected="selected";} ?> >FullScreen</option>
						<option value="2" <?pyretro {if view_mode==2;selected="selected";} ?> >Grid</option>
						<option value="3" <?pyretro {if view_mode==3;selected="selected";} ?> >PanelScreen</option>
						<option value="4" <?pyretro {if view_mode==4;selected="selected";} ?> >Weird</option>
					</select>
				</fieldset>
				<fieldset>
					<label for="id_debug">Debug:</label>
					<input type="checkbox" id="id_debug" name="debug" value="1" <?pyretro {if debug==1;checked="checked";} ?> />
				</fieldset>
				<fieldset>
					<label for="id_windowed">Windowed:</label>
					<input type="checkbox" id="id_windowed" name="windowed" value="1" <?pyretro {if windowed==1;checked="checked";} ?> />
				</fieldset>
				<fieldset>
					<label for="id_screen_width">Screen Width:</label>
					<input type="text" id="id_screen_width" name="screen_width" value="<?pyretro %screen_width% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_screen_height">Screen Height:</label>
					<input type="text" id="id_screen_height" name="screen_height" value="<?pyretro %screen_height% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_shutdown_on_exit">Shutdown on exit:</label>
					<input type="checkbox" id="id_shutdown_on_exit" name="shutdown_on_exit" value="1" <?pyretro {if shutdown_on_exit==1;checked="checked";} ?> />
				</fieldset>
				<fieldset>
					<label for="id_shutdown_command">Shutdown command:</label>
					<input type="text" id="id_shutdown_command" name="shutdown_command" value="<?pyretro %shutdown_command% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_dir_default_game_video">Dir default game video:</label>
					<input type="text" id="id_dir_default_game_video" name="dir_default_game_video" value="<?pyretro %dir_default_game_video% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_seconds_wait_video">Seconds wait video:</label>
					<input type="text" id="id_seconds_wait_video" name="seconds_wait_video" value="<?pyretro %seconds_wait_video% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_time_to_show_screensaver">Time to show screensaver:</label>
					<input type="text" id="id_time_to_show_screensaver" name="time_to_show_screensaver" value="<?pyretro %time_to_show_screensaver% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_seconds_wait_between_screensaver_images">Seconds wait between screensaver images:</label>
					<input type="text" id="id_seconds_wait_between_screensaver_images" name="seconds_wait_between_screensaver_images" value="<?pyretro %seconds_wait_between_screensaver_images% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_can_played_game_show_in_screensaver">Can played game show in screensaver:</label>
					<input type="checkbox" id="id_can_played_game_show_in_screensaver" name="can_played_game_show_in_screensaver" value="1" <?pyretro {if can_played_game_show_in_screensaver==1;checked="checked";} ?> />
				</fieldset>
				<fieldset>
					<label for="id_dir_default_images_screensaver">Dir default images screensaver:</label>
					<input type="text" id="id_dir_default_images_screensaver" name="dir_default_images_screensaver" value="<?pyretro %dir_default_images_screensaver% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_random_percent_default_images_screensaver">Random percent default images screensaver:</label>
					<input type="text" id="id_random_percent_default_images_screensaver" name="random_percent_default_images_screensaver" value="<?pyretro %random_percent_default_images_screensaver% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_transational_effect_screensaver">Transational effect screensaver:</label>
					<input type="text" id="id_transational_effect_screensaver" name="transational_effect_screensaver" value="<?pyretro %transational_effect_screensaver% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_default_background">Default background:</label>
					<input type="text" id="id_default_background" name="default_background" value="<?pyretro %default_background% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_filter">Filter:</label>
					<input type="checkbox" id="id_filter" name="filter" value="1" <?pyretro {if filter==1;checked="checked";} ?> />
				</fieldset>
				<fieldset>
					<label for="id_filter_game_buttons">Filter game buttons:</label>
					<input type="text" id="id_filter_game_buttons" name="filter_game_buttons" value="<?pyretro %filter_game_buttons% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_user_can_edit_favorities">User can edit favorities:</label>
					<input type="checkbox" id="id_user_can_edit_favorities" name="user_can_edit_favorities" value="1" <?pyretro {if user_can_edit_favorities==1;checked="checked";} ?> />
				</fieldset>
				<fieldset>
					<label for="id_webadmin">Webadmin:</label>
					<input type="checkbox" id="id_webadmin" name="webadmin" value="1" <?pyretro {if webadmin==1;checked="checked";} ?> />
				</fieldset>
				<fieldset>
					<label for="id_webadmin_port">Webadmin port:</label>
					<input type="text" id="id_webadmin_port" name="webadmin_port" value="<?pyretro %webadmin_port% ?>"/>
				</fieldset>
				<fieldset>
					<label for="id_webadmin_password">Webadmin password:</label>
					<input type="password" id="id_webadmin_password" name="webadmin_password" value="<?pyretro %webadmin_password% ?>"/>
				</fieldset>
				<input type="submit" name="login" value="UPDATE & RESET" />
			</form>
		</div>
		<div id="footer">
			<div class="shadow_box">
				<a href="https://code.google.com/p/pyretro/">PyRETRO</a> is a MAME frontend written in pygame.
			</div>
		</div>
	</body>
</html>